package user_vc

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func Login(c *gin.Context) {
	username := c.PostForm("username")
	password := c.PostForm("password")
	if username == "张三" && password == "123456" {
		c.JSON(http.StatusOK, gin.H{"msg": "张三, 登录成功"})
	} else {
		c.JSON(http.StatusOK, gin.H{"msg": "登录失败"})
	}
}

func TestPost(c *gin.Context) {
	c.JSON(http.StatusOK, gin.H{"name": "我是post", "age": 123})
}
